<div class="modal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" ng-click="$hide()" aria-hidden="true">×
                </button>
                <h4>New Field </h4>
            </div>
            <div class="modal-body edge">
                <form class="form-horizontal">
                    <div class="form-group">

                        <label class="col-sm-3 control-label">Field Name</label>

                        <div class="col-md-9">
                            <input type="text" class="form-control" ng-model="name" placeholder="Field name"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">Field Type</label>

                        <div class="col-md-9">
                            <select class='form-control' ng-model="type" ng-options="c for c in types">

                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn" ng-click="$hide()">Close</button>
                <button class="btn btn-primary" ng-click="modal.saved=true;$hide();addField(name,type)">Add field
                </button>
            </div>
        </div>
    </div>
</div>
